<include file="Public/head" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.css" />
<script src="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>

</head>
<body>
<include file="Public/common_header" />

<div class="mian">
    <include file="Public/sidebar" menu='zhgl.fuser' />
    <form action="/fours/fours_post/uid/{$info.uid}" method="post"  id="fp">
        <div class="mianR">
            <h3 class="yonghu">4S店账号信息</h3>
            <div class="shangFrom shangFrom1 clearfix">
                <div class="chang-ci">
                    <!-- <input type="button" value="分组管理" class="feiyong" /> -->
                </div>
            </div>
            <div class="employee">
                <ul class="clearfix">
                    <li>
                        <span>用户名:</span>
                        <span>{$info.user_name}</span> 
                        <!-- <input type="text" name="user_name" value="{$info.user_name}" /> -->
                    </li>
                    <li>
                        <span>联系人:</span>
                        <input type="text" name="real_name" value="{$info.real_name}" />
                    </li>
                    <li>
                        <span>联系电话:</span>
                        <input type="text" name="phone"  value="{$info.phone}" />
                    </li>
                    <li>
                        <span>所属4s店:</span>
                        <span style="width: 302px;text-align: left">{$info.f_name}</span>
                        <!-- <select name="city" id="city" >
                            <option value="">请选择城市</option>
                            <?php foreach ($bc_city as $key => $value): ?>
                              <option value="{$key}"
                              <?php if ($key == $info['city']): ?>
                                    selected = "selected"
                                <?php endif ?>
                              >{$value}</option>
                            <?php endforeach ?>
                        </select>
                        <select name="fours" id="fours" >
                            <option value="">请选择所属4s店</option>
                            <volist name='allfours' id='four'>
                                <option value="{$four.fid}" 
                                <?php if ($four['fid'] == $info['fid']): ?>
                                    selected = "selected"
                                <?php endif ?>
                                >{$four.f_name}</option>
                            </volist>
                        </select> -->
                    </li>
                </ul>

            </div>
            <div class="yongBtn">
                <input type="button" onclick="return Submit();" value="确定" class="queding" />
                <input name="重置" type="reset" class="quxiao" onclick="history.go(-1);" value="取消" />
            </div>

        </div>
    </form>
    <div class="clear"></div>
</div>

<!--审核通过-->
<script>
    $("#fours").select2();
        function Submit(){
        post_submit_json('fp',function(data){
            //成功回调
            btn_alert("操作成功",1000,function(){
                location.href = document.referrer;
            });
        })    
        return false;
    }
$("#city").change(function(){
    var city_id = $(this).val();
    $.get("/Fours/get_city",{"city_id":city_id},function(data){
        var optstr = '';
        if(data.code==200){
               $.each(data.data,function(k,val){
                optstr += "<option value='" + val.fid + "'>"+ val.f_name +"</option>"
               })
        }
        $("#fours").html(optstr);  
    },"json");
});

window.onload=function(){
    $("#city").click(function(){
        $(".select2-container .select2-chosen").html("请选择所属4s店");
    });
    $("select").css("color","#000");
    $("select").find("option").css("color","#000");
    $("select").each(function() {
        $(this).change(function(){
             var selectIndex = $(this).get(0).selectedIndex;
             if(selectIndex==0){             
                   $(this).css("color","#000");
                   $("#comeFrom").css("color","#000");
                   $(this).find("option").css("color","#000");
                }else{
                   $(this).css("color","#000");
             }      
       })
    });
}


</script>
<include file="Public/foot" />